package com.wnhz.work.yz.activity;

import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.wnhz.work.yz.BaseActivity;
import com.wnhz.work.yz.R;

/**
 * ---自定义合同
 */
public class UserDefinedCompactActivity extends BaseActivity implements View.OnClickListener {
    private TextView title;
    private String msg;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_defined_compact);

        initData();
        initView();
    }

    private void initData() {
        msg = getIntent().getStringExtra("msg");
    }

    private void initView() {
        title = (TextView) findViewById(R.id.view_main_middle_title);
        title.setText("自定义合同");
        findViewById(R.id.btn_main_left).setOnClickListener(this);
//        findViewById(R.id.tv_submit).setOnClickListener(this);
        showDialogv7(msg, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                Intent intent = new Intent(UserDefinedCompactActivity.this, StandardCompactActivity.class);
                intent.putExtra("pact", "0");
                setResult(RESULT_OK, intent);
                finish();
            }
        });
    }

    @Override
    public void onClick(View v) {
        Intent intent;
        switch (v.getId()) {
            case R.id.btn_main_left:
                finish();
                break;

            //确认并提交
            case R.id.tv_submit:
                MyToast("确认并提交");
                break;

            default:
                break;
        }
    }
}
